package com.wangsd.web.controller;

import com.wangsd.web.utils.Message;
import com.wangsd.web.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/msg")
@Api(tags = "拦截日志查看接口")
public class MessageController {

    @GetMapping("/show")
    @ApiOperation(value = "日志页面跳转接口")
    public String to() {
        return "/msg/interceptors.html";
    }

    @GetMapping("/get")
    @ApiOperation("加载日志数据")
    public R getInterceptorMessage() {
        return R.success().put("data", Message.toList());
    }

}
